@extends('layouts.admin')

@section('title', '后台管理系统')

@section('content')
    <header class="navbar-wrapper">
        <div class="navbar navbar-fixed-top">
            <div class="container-fluid cl"> <a class="logo navbar-logo f-l mr-10 hidden-xs" href="javascript:">后台管理</a> <a class="logo navbar-logo-m f-l mr-10 visible-xs" href="javascript:">H-ui</a>
                <span class="logo navbar-slogan f-l mr-10 hidden-xs">v3.1</span>
                <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:">&#xe667;</a>
                <nav class="nav navbar-nav">
                    <ul class="cl">
                        <li class="dropDown dropDown_hover"><a href="javascript:" class="dropDown_A"><i class="Hui-iconfont">&#xe600;</i> 新增 <i class="Hui-iconfont">&#xe6d5;</i></a>
                            <ul class="dropDown-menu menu radius box-shadow">
                                @permission('office_clbum_clbum')
                                <li><a href="javascript:" onclick="member_add('添加班级','{{url('clbum/clbum/add')}}',850,450)"><i class="Hui-iconfont">&#xe616;</i> 班级</a></li>
                                @endpermission

                                @permission('office_clbum_grade')
                                <li><a href="javascript:" onclick="member_add('添加年级','{{url('clbum/grade/add')}}',800,450)"><i class="Hui-iconfont">&#xe613;</i> 年级</a></li>
                                @endpermission

                                @permission('office_personnel_department')
                                <li><a href="javascript:" onclick="product_add('添加用户','{{url('system/user/add')}}')"><i class="Hui-iconfont">&#xe62c;</i> 用户</a></li>
                                @endpermission

                                @permission('office_student_base')
                                <li><a href="javascript:" onclick="product_add('添加学生','{{url('student/student/add')}}')"><i class="Hui-iconfont">&#xe60d;</i> 学生</a></li>
                                @endpermission
                            </ul>

                        @permission('office')
                        <li class="navbar-levelone current"><a href="javascript:;">办公</a></li>
                        @endpermission

                        @permission('statistics')
                        <li class="navbar-levelone"><a href="javascript:;">统计</a></li>
                        @endpermission

                        @permission('platform')
                        <li class="navbar-levelone"><a href="javascript:">平台</a></li>
                        @endpermission
                        </li>
                    </ul>
                </nav>
                <nav id="Hui-userbar" class="nav navbar-nav navbar-userbar hidden-xs">
                    <ul class="cl">
                        <li>您好</li>
                        <li class="dropDown dropDown_hover">
                            <a href="#" class="dropDown_A">{{Auth::user()->name}} <i class="Hui-iconfont">&#xe6d5;</i></a>
                            <ul class="dropDown-menu menu radius box-shadow">
                                <li><a href="javascript:" onClick="myselfinfo()">个人信息</a></li>
                                <li><a href="{{url('auth/logout')}}">退出</a></li>
                            </ul>
                        </li>
                        <li id="Hui-msg"> <a href="#" title="消息"><span class="badge badge-success">0</span><i class="Hui-iconfont" style="font-size:18px">&#xe68a;</i></a> </li>
                    </ul>
                </nav>
            </div>
        </div>
    </header>
    <aside class="Hui-aside">

        @permission('office')
        <div class="menu_dropdown bk_2">
            @permission('office_personnel')
            <dl id="menu-aaaaa">
                <dt><i class="Hui-iconfont">&#xe62c;</i> 人事管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
                <dd>
                    <ul>
                        @permission('office_personnel_department')
                        <li><a data-href="{{url('personnel/department/index')}}" data-title="组织架构" href="javascript:void(0)">组织架构</a></li>
                        @endpermission

                        @permission('office_personnel_station')
                        <li><a data-href="{{url('personnel/station/index')}}" data-title="岗位管理" href="javascript:void(0)">岗位管理</a></li>
                        @endpermission

                        @permission('office_personnel_permission')
                        <li><a data-href="{{url('personnel/station/permission')}}" data-title="权限管理" href="javascript:void(0)">权限管理</a></li>
                        @endpermission
                    </ul>
                </dd>
            </dl>
            @endpermission

            @permission('office_teacher')
            <dl id="menu-aaaaa">
                <dt><i class="Hui-iconfont">&#xe62b;</i> 教师管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
                <dd>
                    <ul>
                        @permission('office_teacher_base')
                        <li><a data-href="{{url('teacher/teacher/index')}}" data-title="基础信息" href="javascript:void(0)">基础信息</a></li>
                        @endpermission

                        @permission('office_teacher_honour')
                        <li><a data-href="{{url('teacher/teacher/honour')}}" data-title="荣誉管理" href="javascript:void(0)">荣誉管理</a></li>
                        @endpermission
                    </ul>
                </dd>
            </dl>
            @endpermission

            @permission('office_student')
            <dl id="menu-aaaaa">
                <dt><i class="Hui-iconfont">&#xe611;</i> 学生管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
                <dd>
                    <ul>
                        @permission('office_student_base')
                        <li><a data-href="{{url('student/student/index')}}" data-title="学籍管理" href="javascript:void(0)">学籍管理</a></li>
                        @endpermission

                        @permission('office_student_relation')
                        <li><a data-href="{{url('student/relation/index')}}" data-title="家庭联系" href="javascript:void(0)">家庭联系</a></li>
                        @endpermission
                    </ul>
                </dd>
            </dl>
            @endpermission

            @permission('office_clbum')
            <dl id="menu-aaaaa">
                <dt><i class="Hui-iconfont">&#xe67f;</i> 班级管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
                <dd>
                    <ul>
                        @permission('office_clbum_grade')
                        <li><a data-href="{{url('clbum/grade/index')}}" data-title="年级管理" href="javascript:void(0)">年级管理</a></li>
                        @endpermission

                        @permission('office_clbum_clbum')
                        <li><a data-href="{{url('clbum/clbum/index')}}" data-title="班级管理" href="javascript:void(0)">班级管理</a></li>
                        @endpermission
                    </ul>
                </dd>
            </dl>
            @endpermission

            @permission('office_score')
            <dl id="menu-aaaaa">
                <dt><i class="Hui-iconfont">&#xe687;</i> 成绩管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
                <dd>
                    <ul>
                        <li><a data-href="article-list.html" data-title="成绩管理" href="javascript:void(0)">成绩管理</a></li>
                        <li><a data-href="article-list.html" data-title="成绩查询" href="javascript:void(0)">成绩查询</a></li>
                    </ul>
                </dd>
            </dl>
            @endpermission
        </div>
        @endpermission

        @permission('statistics')
        <div class="menu_dropdown bk_2" style="display:none">
            <dl id="menu-bbbbb">
                <dt><i class="Hui-iconfont">&#xe635;</i> 成绩统计<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
                <dd>
                    <ul>
                        <li><a data-href="article-list.html" data-title="成绩统计" href="javascript:void(0)">成绩统计</a></li>
                    </ul>
                </dd>
            </dl>
        </div>
        @endpermission

        @permission('platform')
        <div class="menu_dropdown bk_2" style="display:none">
            @permission('platform_system')
            <dl id="menu-admin">
                <dt><i class="Hui-iconfont">&#xe61d;</i> 系统管理<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
                <dd>
                    <ul>
                        @permission('platform_system_techValue')
                        <li><a data-href="{{url('system/techValue/index')}}" data-title="技术数值" href="javascript:void(0)">技术数值</a></li>
                        @endpermission

                        @permission('platform_system_systemCode')
                        <li><a data-href="{{url('system/systemCode/index')}}" data-title="系统代码" href="javascript:void(0)">系统代码</a></li>
                        @endpermission

                        @permission('platform_system_permission')
                        <li><a data-href="{{url('system/permission/index')}}" data-title="系统资源" href="javascript:void(0)">系统资源</a></li>
                        @endpermission

                        @permission('platform_system_download')
                        <li><a data-href="{{url('system/download/index')}}" data-title="模板资源" href="javascript:void(0)">模板资源</a></li>
                        @endpermission
                    </ul>
                </dd>
            </dl>
            @endpermission
        </div>
        @endpermission

    </aside>
    <div class="dislpayArrow hidden-xs"><a class="pngfix" href="javascript:void(0);" onClick="displaynavbar(this)"></a></div>
    <section class="Hui-article-box">
        <div id="Hui-tabNav" class="Hui-tabNav hidden-xs">
            <div class="Hui-tabNav-wp">
                <ul id="min_title_list" class="acrossTab cl">
                    <li class="active">
                        <span title="我的桌面" data-href="welcome.html">我的桌面</span>
                        <em></em></li>
                </ul>
            </div>
            <div class="Hui-tabNav-more btn-group"><a id="js-tabNav-prev" class="btn radius btn-default size-S" href="javascript:"><i class="Hui-iconfont">&#xe6d4;</i></a><a id="js-tabNav-next" class="btn radius btn-default size-S" href="javascript:"><i class="Hui-iconfont">&#xe6d7;</i></a></div>
        </div>
        <div id="iframe_box" class="Hui-article">
            <div class="show_iframe">
                <div style="display:none" class="loading"></div>
                <iframe scrolling="yes" frameborder="0" src="{{url('info')}}"></iframe>
            </div>
        </div>
    </section>

    <div class="contextMenu" id="Huiadminmenu">
        <ul>
            <li id="closethis">关闭当前 </li>
            <li id="closeall">关闭全部 </li>
        </ul>
    </div>
@endsection
@section('script')
    <script type="text/javascript" src="{{asset('lib/jquery.contextmenu/jquery.contextmenu.r2.js')}}"></script>
    <script type="text/javascript">
        $(function(){
            /*$("#min_title_list li").contextMenu('Huiadminmenu', {
             bindings: {
             'closethis': function(t) {
             console.log(t);
             if(t.find("i")){
             t.find("i").trigger("click");
             }
             },
             'closeall': function(t) {
             alert('Trigger was '+t.id+'\nAction was Email');
             },
             }
             });*/


            $("body").Huitab({
                tabBar:".navbar-wrapper .navbar-levelone",
                tabCon:".Hui-aside .menu_dropdown",
                className:"current",
                index:0,
            });
        });
        /*个人信息*/
        function myselfinfo(){
            //判断账号类型进入不容个人信息页面；目前都是教师，直接进入即可
            layer_full_show('个人信息','{{url('teacher/teacher/edit')}}?id={{Auth::user()->id}}');
        }

        /*资讯-添加*/
        function article_add(title,url){
            var index = layer.open({
                type: 2,
                title: title,
                content: url
            });
            layer.full(index);
        }
        /*图片-添加*/
        function picture_add(title,url){
            var index = layer.open({
                type: 2,
                title: title,
                content: url
            });
            layer.full(index);
        }
        /*产品-添加*/
        function product_add(title,url){
            var index = layer.open({
                type: 2,
                title: title,
                content: url
            });
            layer.full(index);
        }
        /*用户-添加*/
        function member_add(title,url,w,h){
            layer_show(title,url,w,h);
        }
    </script>
@endsection